
/*------------------------------------------------------------------------------------------------------------------------
This replicate the numbers for the tabels and figures in the ARTICLE "Using a Deliberative Poll on breast cancer screening to 
assess and improve the decision quality of laypeople by Manja D. Jensen, Kasper M. Hansen, Volkert Siersma and John Brodersen.
--------------------------------------------------------------------------------------------------------------------------*/




/*The three dataset used:*/

libname manja "INSERT FILE PATH"; run;
data longdata; set manja.longdata;run;	
data barchart; set manja.barchart;run; 
data SURVEYRECODE; set manja.SURVEYRECODE; run;

/*The three dataset contain surveydata. For question wording see article supplementary file S2_Fig (Questionnaire).



/*----------------------------------VARIABLES in the dataset "SURVEYRECODE"-------------------------------------------------
Aldersgruppe (Age group) 1=18-30, 2=31-40, 3=41-50, 4=51-60, 5=61-70.
Brystkraeft (History of breast cancer in the family)(1=yes, 2=no, 3=don't know, 4= don't want to answer)
Civilstand (Merital status), 1=Never merried and not living with a partner.2=Merried or civil partnerchip, 3=living with partner (no papers), 4=Seperated/Divorced, 5=Widowed
Koen (Sex)1=male, 2=female
Storkreds (Recidence) 1=Copenhagen, 2=Around copenhagen, 3=Northern Zealand, 4=Bornholm, 5=Zealand, 6=Funen, 7=Southern Jutland, 8= Estern Jutland, 9=Western Jutland, 10=Northern Jutland.
AUsundhed (Working/educated within the healthcare sector), 1=yes 2=no.
Gennemfoertudd (Education)1=Folkeskole 7 �r (7years), 2=Folkeskole 8-10�r (8-10years), 3=Mellemskole/Realeksamen, 4=Studentereksamen, 5=vocational training, 6=short, 7=middle, 8=long.		 
T1V1 (Attitude:Women in Denmark should be invited to mammography screening, 1=Strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1HVbekymret (Worry) 1=never, 2=less than once a month, 3=once a month, 4=once a week, 5=daily, 6=several times daily, 7=don't know.
T1K1 (Conceptual nowledge, diagnosis, 1= correct answer.
T1K2 (Conceptual knowledge, overdiagnosis)= 1=correct answer.
T2Setvideo (Compliance,video)1=never, 2=three times or more, 3=twice, 4=once
T2Tjekvideo (Test question,compliance) 3= correct answer.
Gruppedisk1-Gruppedisk10 (evaluation of deliberation in groups) 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
Borgermoede1-Borgermoede6 (evaluation of the deliberative poll) 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T3Velinformeret (evaluation of the deliberative poll) 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
Moderator1- Moderator2 (evaluation of moderators) 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T2Video1-T2Video6 (evaluation of the video) 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1K1korrekt (conceptual knowledge questions, T1)Screening increases breast cancer diagnoses (K1), 1=correct, 0=incorrect answer.
T1K2korrekt (conceptual knowledge questions, T1)Screening leads to some women getting unnecessary treatment (K2), 1=correct, 0=incorrect answer.
T1K3korrekt (conceptual knowledge questions, T1)Not all breast cancers cause illness (K3), 1=correct, 0=incorrect answer.
T1K4korrekt (conceptual knowledge questions, T1)Screening will not find every breast cancer (k4), 1=correct, 0=incorrect answer.
T1K5korrekt (conceptual knowledge questions, T1)Screening reduces breast cancer deaths (K5), 1=correct, 0=incorrect answer.
T1K6korrekt (conceptual knowledge questions, T1)The meaning of false positive results (K6), 1=correct, 0=incorrect answer.
T1K7korrekt (conceptual knowledge questions, T1)Screening may result in prolonged life as a patient (K7), 1=correct, 0=incorrect answer.
T1K8korrekt (conceptual knowledge questions, T1)Screening is for women without symptoms (K8), 1=correct, 0=incorrect answer.
T1K9korrekt (conceptual knowledge questions, T1)Benefit evaluation � reduced mortality (K9), 1=correct, 0=incorrect answer.
T2K1korrekt-T2K9korrekt (conceptual knowledge questions for T2. Questions and coding like those for T1)
T3K1korrekt-T3K9korrekt (conceptual knowledge questions for T3. Questions and coding like those for T1)
T4K1korrekt-T4K9korrekt (conceptual knowledge questions for T4. Questions and coding like those for T1)
T1N1gist (numerical knowledge questions, T1)Breast cancer mortality without mammography screening (Gist1), 1=correct, 0=incorrect answer.
T1N2gist (numerical knowledge questions, T1)Breast cancer mortality with mammography screening (Gist2), 1=correct, 0=incorrect answer.
T1N3gist (numerical knowledge questions, T1)Overdiagnosis (Gist3), 1=correct, 0=incorrect answer.
T1N4gist (numerical knowledge questions, T1)False positives (Gist4), 1=correct, 0=incorrect answer.
T2N1gist-T2N4gist (numerical knowledge questions, T2. Questions and coding like those for T1)
T3N1gist-T3N4gist (numerical knowledge questions, T3. Questions and coding like those for T1)
T4N1gist-T4N4gist (numerical knowledge questions, T4. Questions and coding like those for T1)
*/


/*---------------------------------VARIABLES in the dataset "longdata":-------------------------------------------------------------------
T (timepoint), 99=recruitment, 2=after video information, 3=after deliberation and 4= one month after the assembly.
T2 (timepoint), 1=recruitment, 99=after video information, 3=after deliberation and 4= one month after the assembly.
T3 (timepoint), 1=recruitment, 2=after video information, 99=after deliberation and 4= one month after the assembly.
ID (ID number)
Storkreds (Recidence) 1=Copenhagen, 2=Around copenhagen, 3=Northern Zealand, 4=Bornholm, 5=Zealand, 6=Funen, 7=Southern Jutland, 8= Estern Jutland, 9=Western Jutland, 10=Northern Jutland.
Storkreds1-Storkreds10= dichotomous variables of Storkreds, Recidence in the electorial district specified in the name of the variable as opposed to recidence in all other places.
Aldersgruppe (Age group) 1=18-30, 2=31-40, 3=41-50, 4=51-60, 5=61-70.			
Aldersgruppe1-Aldersgruppe5 = Aldersgruppe, but 1,2,3,4 and 5 is replaced by 99 respectively.
Koen (Sex)1=male, 2=female
Koen2 =Koen, but 1 is replaced by 99.
Civilstand (Merital status), 1=Never merried and not living with a partner.2=Merried or civil partnerchip, 3=living with partner (no papers), 4=Seperated/Divorced, 5=Widowed
Civilstand1-Civilstand5 = dichotomous variables of Civilstand				
Gennemfoertudd (Education)1=Folkeskole 7 �r (7years), 2=Folkeskole 8-10�r (8-10years), 3=Mellemskole/Realeksamen, 4=Studentereksamen, 5=vocational training, 6=short, 7=middle, 8=long.)		
Gennemfoertudd1-Gennemfoertudd5 =Gennemfoertudd, but 1,2,3,4 is but together as one category. 
AUsundhed (Working/educated within the healthcare sector), 1=yes 2=no.
AUsundhed1=AUsundhed but 1 is replaced with 99.
Brystkraeft (History of breast cancer in the family)(1=yes, 2=no, 3=don't know, 4= don't want to answer)
Brystkraeft1=Brystkraeft, but 1 is replaced by 99.
Brystkraeft2=Brystkraeft, but 2 is replaced by 99.
T1HVbekymret (Worry) 1=never, 2=less than once a month, 3=once a month, 4=once a week, 5=daily, 6=several times daily, 7=don't know.
HVbekymret1-HVbekymret7=T1HVbekymret, but 1,2,3,4,5,6 and 7 is replaced by 99 respectively.
K1korrekt (conceptual knowledge questions) Screening increases breast cancer diagnoses, 1=correct, 0=incorrect answer.
K2korrekt (conceptual knowledge questions) Screening leads to some women getting unnecessary treatment, 1=correct, 0=incorrect answer.
K3korrekt (conceptual knowledge questions) Not all breast cancers cause illness, 1=correct, 0=incorrect answer.
K4korrekt (conceptual knowledge questions) Screening will not find every breast cancer, 1=correct, 0=incorrect answer.
K5korrekt (conceptual knowledge questions) Screening reduces breast cancer deaths, 1=correct, 0=incorrect answer.
K6korrekt (conceptual knowledge questions) The meaning of false positive results, 1=correct, 0=incorrect answer.
K7korrekt (conceptual knowledge questions) Screening may result in prolonged life as a patient, 1=correct, 0=incorrect answer.
K8korrekt (conceptual knowledge questions) Screening is for women without symptoms, 1=correct, 0=incorrect answer.
K9korrekt (conceptual knowledge questions) Benefit evaluation � reduced mortality, 1=correct, 0=incorrect answer. 
N1gist (numerical knowledge questions) Breast cancer mortality without mammography screening, 1=correct, 0=incorrect answer.
N2gist (numerical knowledge questions) Breast cancer mortality with mammography screening, 1=correct, 0=incorrect answer.
N3gist (numerical knowledge questions) Overdiagnosis, 1=correct, 0=incorrect answer.
N4gist (numerical knowledge questions) False positives, 1=correct, 0=incorrect answer.
Videnspoint (Knowledge score = the sum of correct answers to all knowledge questions *7.6923)
T1vidensniveau (Knowledge level at recruitment. 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
Vniveau1 (dichotomous variable of knowledge level) 1= low level, 0=middel and high level.
Vniveau2 (dichotomous variable of knowledge level) 1= middle level, 0= low and high level.
Vniveau3 (dichotomous variable of knowledge level) 1= high level, 0= low and middle level.
InitielV52c (Reccommendation about mammography screening), 2=continue, 3=expand.
InitieldecisiveV52c (Decisiveness), 4= decisive (discontinue, continue and expand put together), 999= undecisive (=don't know).
VaegtC2 (Balance), 1=don't know, 0= other answers.
Bekymret2C2 (Worry), 1=don't know, 0= other answers.
TilhaengerC2 (Support), 1=don't know, 0= other answers.
SSTC2 (Authorities), 1=don't know, 0= other answers.
PolitC2 (Politics), 1=don't know, 0= other answers.
Key1C2 (Effect), 1=don't know, 0= other answers.
Key2C2 (Costs), 1=don't know, 0= other answers.
Key3C2 (Qualified), 1=don't know, 0= other answers.
Key4C2 (Mandatory1), 1=don't know, 0= other answers.
Key5C2 (Mandatory2), 1=don't know, 0= other answers.
Key6C2 (Ethics), 1=don't know, 0= other answers.
Key7C2 (Acquaintances), 1=don't know, 0= other answers.
Key9C2 (Regret), 1=don't know, 0= other answers.
Key10C2 (Seen), 1=don't know, 0= other answers.
*/


/*---------------------------------VARIABLES in the dataset "barchart":-------------------------------------------------------------------
Aldersgruppe (Age group) 1=18-30, 2=31-40, 3=41-50, 4=51-60, 5=61-70.
Gennemfoertudd (Education)1=Folkeskole 7 �r (7years), 2=Folkeskole 8-10�r (8-10years), 3=Mellemskole/Realeksamen, 4=Studentereksamen, 5=vocational training, 6=short, 7=middle, 8=long.		 
Koen (Sex)1=male, 2=female
Storkreds (Recidence) 1=Copenhagen, 2=Around copenhagen, 3=Northern Zealand, 4=Bornholm, 5=Zealand, 6=Funen, 7=Southern Jutland, 8= Estern Jutland, 9=Western Jutland, 10=Northern Jutland.
Civilstand (Merital status), 1=Never merried and not living with a partner.2=Merried or civil partnerchip, 3=living with partner (no papers), 4=Seperated/Divorced, 5=Widowed
AUsundhed (Working/educated within the healthcare sector), 1=yes 2=no.
Brystkraeft (History of breast cancer in the family)(1=yes, 2=no, 3=don't know, 4= don't want to answer)
T1HVbekymret (Worry) 1=never, 2=less than once a month, 3=once a month, 4=once a week, 5=daily, 6=several times daily, 7=don't know.
T1K1korrekt (conceptual knowledge questions, T1)Screening increases breast cancer diagnoses (K1), 1=correct, 0=incorrect answer.
T1K2korrekt (conceptual knowledge questions, T1)Screening leads to some women getting unnecessary treatment (K2), 1=correct, 0=incorrect answer.
T1K3korrekt (conceptual knowledge questions, T1)Not all breast cancers cause illness (K3), 1=correct, 0=incorrect answer.
T1K4korrekt (conceptual knowledge questions, T1)Screening will not find every breast cancer (k4), 1=correct, 0=incorrect answer.
T1K5korrekt (conceptual knowledge questions, T1)Screening reduces breast cancer deaths (K5), 1=correct, 0=incorrect answer.
T1K6korrekt (conceptual knowledge questions, T1)The meaning of false positive results (K6), 1=correct, 0=incorrect answer.
T1K7korrekt (conceptual knowledge questions, T1)Screening may result in prolonged life as a patient (K7), 1=correct, 0=incorrect answer.
T1K8korrekt (conceptual knowledge questions, T1)Screening is for women without symptoms (K8), 1=correct, 0=incorrect answer.
T1K9korrekt (conceptual knowledge questions, T1)Benefit evaluation � reduced mortality (K9), 1=correct, 0=incorrect answer.
T2K1korrekt-T2K9korrekt (conceptual knowledge questions for T2. Questions and coding like those for T1)
T3K1korrekt-T3K9korrekt (conceptual knowledge questions for T3. Questions and coding like those for T1)
T4K1korrekt-T4K9korrekt (conceptual knowledge questions for T4. Questions and coding like those for T1)
T1N1gist (numerical knowledge questions, T1)Breast cancer mortality without mammography screening (Gist1), 1=correct, 0=incorrect answer.
T1N2gist (numerical knowledge questions, T1)Breast cancer mortality with mammography screening (Gist2), 1=correct, 0=incorrect answer.
T1N3gist (numerical knowledge questions, T1)Overdiagnosis (Gist3), 1=correct, 0=incorrect answer.
T1N4gist (numerical knowledge questions, T1)False positives (Gist4), 1=correct, 0=incorrect answer.
T2N1gist-T2N4gist (numerical knowledge questions, T2. Questions and coding like those for T1)
T3N1gist-T3N4gist (numerical knowledge questions, T3. Questions and coding like those for T1)
T4N1gist-T4N4gist (numerical knowledge questions, T4. Questions and coding like those for T1)
T1Videnspoint (Knowledge score at T1 = the sum of correct answers to all knowledge questions at T1 *7.6923)
T2Videnspoint (Knowledge score at T2 = the sum of correct answers to all knowledge questions at T2 *7.6923)
T3Videnspoint (Knowledge score at T3 = the sum of correct answers to all knowledge questions at T3 *7.6923)
T4Videnspoint (Knowledge score at T4 = the sum of correct answers to all knowledge questions at T4 *7.6923)
T1vidensniveau (Knowledge level at recruitment. 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
T2vidensniveau (Knowledge level after video information. 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
T3vidensniveau (Knowledge level after deliberation. 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
T4vidensniveau (Knowledge level one month after assembly. 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
LaeringT1T3= sum (T3Videnspoint minus T1Videnspoint).
InitielV5 (Reccommendation about mammography screening) 1=discontinue, 2=continue, 3=expand, 999=don't know 
InitieldecisiveV5 (Decisiveness) 1=decisive, 999=don't know.

T1Vaegt (Balance), (1=most in agreement with A, 2=most in agreement with B, 3=Don't know, 4=Neither agreeing with A nor B )
T1Bekymret2 (Worry), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Tilhaenger (Support), 1= Strong support, 2=support, 3=neither, 4= opponent 5=strong opponent, 6=don't know.
T1SST (Authorities), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Polit (Politics), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key1 (Effect), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key2 (Costs), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key3 (Qualified), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key4 (Mandatory1), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key5 (Mandatory2), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key6 (Ethics), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key7 (Acquaintances), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key9 (Regret), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
T1Key10 (Seen), 1=strongly agree, 2=somewhat agree, 3=Neither agree nor disagree, 4=somewhat disagree, 5=Strongly disagree, 6=Don't know.
(The above variables from T1Vaegt to T1Key10 for timepoint T2, T3 and T4 is coded the same af for T1)

T1VaegtNY (Balance), like T1Vaegt but don't know =.
T1Bekymret2NY (Worry), like T1Bekymret2 but don't know =.
T1TilhaengerNY (Support), like T1Tilhaenger but don't know =.
T1SSTNY (Authorities),  like T1SST but don't know =.
T1PolitNY (Politics),like T1Polit but don't know =.
T1Key1NY (Effect), like T1Key1 but don't know =.
T1Key2NY (Costs), like T1Key2 but don't know =.
T1Key3NY (Qualified), like T1Key3 but don't know =.
T1Key4NY (Mandatory1), like T1Key4 but don't know =.
T1Key5NY (Mandatory2), like T1Key5 but don't know =.
T1Key6NY (Ethics), like like T1Key6 but don't know =.
T1Key7NY (Acquaintances), like T1Key7 but don't know =.
T1Key9NY (Regret), like T1Key9 but don't know =.
T1Key10NY (Seen),like T1Key10 but don't know =.
(The above variables from T1VaegtNY to T1Key10NY for timepoint T2, T3 and T4 is coded the same af for T1)
*/





/*----------------------------TABLE 1 Participant characteristics---------------------------------------------------------*/

proc freq data=SURVEYRECODE;
tables (Aldersgruppe Brystkraeft Civilstand Koen Storkreds AUsundhed Gennemfoertudd)/; /*nopercent norow*/;
run;
proc freq data=SURVEYRECODE; 
tables (T1V1); 
run;
proc freq data=SURVEYRECODE; 
tables (T1HVbekymret); 
run;
proc freq data=SURVEYRECODE; 
tables (T1K1); 
run;
proc freq data=SURVEYRECODE; 
tables (T1K2); 
run;

/*CHI squared test Table 1*/
data tabelkoen;
input data$ koen$ antal;
datalines;
Sampel kvinde 43
Sampel mand 46
General kvinde  1932018
General mand 1953779
;
run;

proc freq data=tabelkoen;
tables data*koen
/ nopercent nocol chisq expected riskdiffc;
weight antal;
run;

Data Tabelalder;
Input data $ alder$ antal;
datalines;
Sample 1830 18
Sample 3140 17
Sample 4150 21
Sample 5160 18
Sample 6170 15
Generel 1830 993248
Generel 3140 681810
Generel 4150 758737
Generel 5160 796573
Generel 6170 655429
;
run;

Proc freq data=Tabelalder;
Table data*alder/chisq;
Weight antal;
Run;

Data Tabeludd;
Input data $ udd$ antal;
datalines;
Sample 713 36
Sample vocational 25
Sample short 7
Sample mid 12
Sample long 9
Generel 713 1431049
Generel vocational 1156204
Generel short 207283
Generel mid 721888
Generel long 470368
;
run;

Proc freq data=Tabeludd;
Table data*udd/chisq;
Weight antal;
Run;

data tabelres;
input data$ res$ antal;
datalines;
Sampel cop 20
Sampel arcop 8
Sampel norzea 10
Sampel born 0
Sampel zea 12
Sampel funen 6
Sampel southjut 10
Sampel estjut 15
Sampel westjut 2
Sampel northjut 6
General cop 589823
General arcop 357860
General norzea 290994
General born 25209
General zea 544807
General funen 330250
General southjut 471796
General estjut 545961
General westjut 339053
General northjut 390044
;
run;

Proc freq data=Tabelres;
Table data*res/chisq;
Weight antal;
Run;

Data TabelCivilstatus;
Input data$ Civilstatus$ antal;
Datalines;
Sample Never 45
Sample Married 28
Sample Divorced 12
Sample Widowed 4
General Never 1661572
General Married 1711806
General Divorced 448196
General Widowed 64223
;
Run;
 
Proc freq data=TabelCivilstatus;
Table data*civilstatus/chisq;
Weight antal;
Run;

data tabelattitude;
input data$ attitude$ antal;
datalines;
Sampel Strongagree 79
Sampel Someagree 5
Sampel Neither 2
Sampel Somedis 1
Sampel Strongdis 1
Sampel Dontknow 1
General Strongagree 1095
General Someagree 89
General Neither 43
General Somedis 11
General Strongdis 7
General Dontknow 45
;
run;

Proc freq data=Tabelattitude;
Table data*attitude/chisq;
Weight antal;
Run;

data tabelworry;
input data$ worry$ antal;
datalines;
Sampel Never 27
Sampel Less 47
Sampel OnceM 7
Sampel OnceW 2
Sampel Daily 1
Sampel Several 2
Sampel Dontknow 3
General Never 426
General Less 586
General OnceM 110
General OnceW 29
General Daily 15
General Several 7
General Dontknow 101
;
run;

Proc freq data=Tabelworry;
Table data*worry/chisq;
Weight antal;
Run;

data tabelHealthcare;
input data$ Health$ antal;
datalines;
Sampel ja 13
Sampel nej 76
General ja 193
General nej 1093
;
run;

proc freq data=tabelHealthcare;
tables data*Health
/ nopercent nocol chisq expected riskdiffc;
weight antal;
run;






/*--------------------------TABEL 2 - Compliance with the video intervention---------------------------------------*/
proc freq data=SURVEYRECODE; 
tables (T2SetVideo T2tjekvideo); 
run;





/*--------------------------TABLE 3 - Participants evaluation of deliberation*------------------------------------*/
proc freq data=SURVEYRECODE; 
tables (Gruppedisk10 Gruppedisk11 Gruppedisk12 Gruppedisk13); 
run;






/*--------------------------FIGURE 3 - Level of knowledge (Numbers for figure 3------------------------------------)*/
Proc freq data=barchart;
tables (T1vidensniveau T2Vidensniveau T3Vidensniveau T4Vidensniveau);
run;

/*Figur 3, P-values

/*T1-T2:read where it says 2 in output */
Proc genmod data=longdata descending;
   Class T ID;
   Model Vniveau3=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;

/*T2-T3: read where it says 3 in output */
Proc genmod data=longdata descending;
   Class T2 ID;
   Model Vniveau3=T2/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;

/*T3-T4: read where it says 4 in output*/
Proc genmod data=longdata descending;
   Class T3 ID;
   Model Vniveau3=T3/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;   






/*--------------------------TABLE 4 Learning divided according to initial reccommendation and decisiveness-------------------*/

/*Learning=Difference in mean total knowledge score (index) T1-T3*/
proc means data=barchart;
var LaeringT1T3; 
class InitielV5;
run;
proc means data=barchart;
var LaeringT1T3; 
class InitieldecisiveV5;
run;
/*n*/
proc freq data=barchart;
tables InitielV5 /norow; 
run;
proc freq data=barchart;
tables InitieldecisiveV5 /norow; 
run;

/* Learning=Difference (pp) in correct answers between T1 and T3. 
PP is calculated manually by subtraction: T3korrekt  minus T1korrekt.*/
proc freq data=barchart;
tables (T1K1korrekt T3K1korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K2korrekt T3K2korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K3korrekt T3K3korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K4korrekt T3K4korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K5korrekt T3K5korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K6korrekt T3K6korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K7korrekt T3K7korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K8korrekt T3K8korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K9korrekt T3K9korrekt)*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N1gist T3N1gist )*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N2gist T3N2gist )*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N3gist T3N3gist )*InitielV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N4gist T3N4gist )*InitielV5 / nopercent norow; 
run;


proc freq data=barchart;
tables (T1K1korrekt T3K1korrekt)*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K2korrekt T3K2korrekt)*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K3korrekt T3K3korrekt)*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K4korrekt T3K4korrekt)*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K5korrekt T3K5korrekt)*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K6korrekt T3K6korrekt)*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K7korrekt T3K7korrekt)*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K8korrekt T3K8korrekt)*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1K9korrekt T3K9korrekt)*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N1gist T3N1gist )*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N2gist T3N2gist )*InitieldecisiveV5  / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N3gist T3N3gist )*InitieldecisiveV5 / nopercent norow; 
run;
proc freq data=barchart;
tables (T1N4gist T3N4gist )*InitieldecisiveV5  / nopercent norow; 
run;


/* Test, table 4- difference in mean total knowledgescore between "continue" og "expand"*/
Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model Videnspoint=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

/* Test, table 4 - difference in mean total knowledgescore between desicive (="continue" and "expand") vs. "dont know*/
Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model Videnspoint=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

/* Test, table 4 - difference in correct answers to each of the knowledge questions between "continue" og "expand"*/
Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K1korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K2korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K3korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K4korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K5korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K6korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K7korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K8korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model K9korrekt=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model N1gist=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model N2gist=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model N3gist=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitielV52c;
   Model N4gist=T InitielV52c  T*InitielV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 


/* Test, table 4 - difference in correct answers to each of the knowledge questions between desicive (="continue" and "expand") vs. "dont know*/
Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K1korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K2korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K3korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K4korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K5korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K6korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K7korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K8korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model K9korrekt=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model N1gist=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model N2gist=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model N3gist=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 

Proc genmod data=longdata descending;
   Class T ID InitieldecisiveV52c;
   Model N4gist=T InitieldecisiveV52c  T*InitieldecisiveV52c/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 








/*-------------------------FIGURE 4 Opinion formation, % Don't know (AND S6 Table. ) -----------------------------------------------------------------------*/

/* Numbers for figure 4 are calculated below. 6=Dont know*/
proc freq data=barchart;
tables (T1Vaegt T1Bekymret2 T1Tilhaenger T1SST T1Polit T1Key1 T1Key2 T1Key3 T1Key4 T1Key5 T1Key6 T1Key7 T1Key9 T1Key10) / norow; 
run;
proc freq data=barchart;
tables (T2Vaegt T2Bekymret2 T2Tilhaenger T2SST T2Polit  T2Key1 T2Key2 T2Key3 T2Key4 T2Key5 T2Key6 T2Key7 T2Key9 T2Key10) / norow; 
run;
proc freq data=barchart;
tables (T3Vaegt T3Bekymret2 T3Tilhaenger T3SST T3Polit T3Key1 T3Key2 T3Key3 T3Key4 T3Key5 T3Key6 T3Key7 T3Key9 T3Key10) /  norow; 
run;
proc freq data=barchart;
tables (T4Vaegt T4Bekymret2 T4Tilhaenger T4SST T4Polit T4Key1 T4Key2 T4Key3 T4Key4 T4Key5 T4Key6 T4Key7 T4Key9 T4Key10) / norow; 
run;

/*p-values, figure 4*/
Proc genmod data=longdata descending;
   Class T ID;
   Model VaegtC2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Bekymret2C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model TilhaengerC2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model SSTC2=T;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model PolitC2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key1C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key2C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key3C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key4C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key5C2=T;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key6C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key7C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key9C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model Key10C2=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;







/*-------------------FIGURE 5 - Stability (Intercorrelations) (AND S3 Fig)--------------------------*/

proc corr data=barchart;
var T1VaegtNY T2VaegtNY T3VaegtNY T4VaegtNY ;
run;
proc corr data=barchart;
var T1Bekymret2NY T2Bekymret2NY T3Bekymret2NY T4Bekymret2NY ;
run;
proc corr data=barchart;
var T1TilhaengerNY T2TilhaengerNY T3TilhaengerNY T4TilhaengerNY ;
run;
proc corr data=barchart;
var T1SSTNY T2SSTNY T3SSTNY T4SSTNY;
run;
proc corr data=barchart;
var T1PolitNY T2PolitNY T3PolitNY T4PolitNY;
run;
proc corr data=barchart;
var T1Key1NY T2Key1NY T3Key1NY T4Key1NY;
run;
proc corr data=barchart;
var T1Key2NY T2Key2NY T3Key2NY T4Key2NY;
run;
proc corr data=barchart;
var T1Key3NY T2Key3NY T3Key3NY T4Key3NY;
run;
proc corr data=barchart;
var T1key4NY T2key4NY T3key4NY T4key4NY;
run;
proc corr data=barchart;
var T1Key5NY T2Key5NY T3Key5NY T4Key5NY;
run;
proc corr data=barchart;
var T1Key6NY T2Key6NY T3Key6NY T4Key6NY;
run;
proc corr data=barchart;
var T1Key7NY T2Key7NY T3Key7NY T4Key7NY;
run;
proc corr data=barchart;
var T1Key9NY T2Key9NY T3Key9NY T4Key9NY;
run;
proc corr data=barchart;
var T1Key10NY T2Key10NY T3Key10NY T4Key10NY;
run;







/*---------------------------------FIGURE 6 Opinion Consistancy (AND S4 Fig)------------------------------------------------------*/
proc corr data=barchart;
var T1VaegtNY T1Bekymret2NY T1TilhaengerNY T1SSTNY T1PolitNY T1Key1NY T1Key2NY T1Key3NY T1key4NY T1Key5NY
 T1Key6NY T1Key7NY T1Key9NY T1Key10NY;
run;
proc corr data=barchart;
var T2VaegtNY T2Bekymret2NY T2TilhaengerNY T2SSTNY T2PolitNY T2Key1NY T2Key2NY T2Key3NY T2key4NY T2Key5NY
 T2Key6NY T2Key7NY T2Key9NY T2Key10NY;
run;
proc corr data=barchart;
var T3VaegtNY T3Bekymret2NY T3TilhaengerNY T3SSTNY T3PolitNY T3Key1NY T3Key2NY T3Key3NY T3key4NY T3Key5NY
 T3Key6NY T3Key7NY T3Key9NY T3Key10NY;
run;
proc corr data=barchart;
var T4VaegtNY T4Bekymret2NY T4TilhaengerNY T4SSTNY T4PolitNY T4Key1NY T4Key2NY T4Key3NY T4key4NY T4Key5NY
 T4Key6NY T4Key7NY T4Key9NY T4Key10NY;
run;







/*------------------------S3 Table - Participants evaluation of the deliberative poll------------------------------------*/

/*Deliberation in groups*/
proc freq data=SURVEYRECODE; 
tables (Gruppedisk1 Gruppedisk2 Gruppedisk3 Gruppedisk4 Gruppedisk5 Gruppedisk6 Gruppedisk7 Gruppedisk8 Gruppedisk9 Gruppedisk10 Gruppedisk11 Gruppedisk12 Gruppedisk13); 
run;

/*Deliberative poll*/
proc freq data=SURVEYRECODE; 
tables (Borgermoede1 Borgermoede2 Borgermoede3 Borgermoede4 Borgermoede5 Borgermoede6 T3Velinformeret); 
run;

/*Moderators*/
proc freq data=SURVEYRECODE; 
tables (Moderator1 Moderator2); 
run;

/*Video information*/
proc freq data=SURVEYRECODE; 
tables (T2Video1 T2Video2 T2Video3 T2Video4 T2Video5 T2Video6); 
run;







/*-------------------------S4 Table - Mean level of knowledge (index 0-100) divided according to sociodemographic 
characteristics as well as worry and knowledge starting point-----------------------------------------------------------*/

proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Aldersgruppe;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Gennemfoertudd;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Koen;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Storkreds;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Civilstand;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class AUsundhed;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class Brystkraeft;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class T1Vidensniveau;
run;
proc means data=barchart;
var T1Videnspoint T2Videnspoint T3Videnspoint T4Videnspoint;
class T1HVbekymret;
run;


/*Test, S4 Table, Difference in mean level of knowledge T1-T3*/
/*koen*/
Proc genmod data=longdata descending;
   Class T ID koen;
   Model Videnspoint=T koen  T*koen/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID koen2;
   Model Videnspoint=T koen2  T*koen2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Aldersgrupper*/
Proc genmod data=longdata descending;
   Class T ID aldersgruppe;
   Model Videnspoint=T aldersgruppe  T*aldersgruppe/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID aldersgruppe1;
   Model Videnspoint=T aldersgruppe1  T*aldersgruppe1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID aldersgruppe2;
   Model Videnspoint=T aldersgruppe2  T*aldersgruppe2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID aldersgruppe3;
   Model Videnspoint=T aldersgruppe3  T*aldersgruppe3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID aldersgruppe4;
   Model Videnspoint=T aldersgruppe4  T*aldersgruppe4/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID aldersgruppe5;
   Model Videnspoint=T aldersgruppe5  T*aldersgruppe5/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Gennemfoert*/
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd;
   Model Videnspoint=T Gennemfoertudd  T*Gennemfoertudd/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd1;
   Model Videnspoint=T Gennemfoertudd1  T*Gennemfoertudd1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd2;
   Model Videnspoint=T Gennemfoertudd2  T*Gennemfoertudd2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd3;
   Model Videnspoint=T Gennemfoertudd3  T*Gennemfoertudd3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd4;
   Model Videnspoint=T Gennemfoertudd4  T*Gennemfoertudd4/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Gennemfoertudd5;
   Model Videnspoint=T Gennemfoertudd5  T*Gennemfoertudd5/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*storkreds*/
Proc genmod data=longdata descending;
   Class T ID Storkreds;
   Model Videnspoint=T Storkreds  T*Storkreds/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds1;
   Model Videnspoint=T Storkreds1  T*Storkreds1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds2;
   Model Videnspoint=T Storkreds2  T*Storkreds2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds3;
   Model Videnspoint=T Storkreds3  T*Storkreds3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds5;
   Model Videnspoint=T Storkreds5  T*Storkreds5/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds6;
   Model Videnspoint=T Storkreds6  T*Storkreds6/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds7;
   Model Videnspoint=T Storkreds7  T*Storkreds7/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds8;
   Model Videnspoint=T Storkreds8  T*Storkreds8/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds9;
   Model Videnspoint=T Storkreds9  T*Storkreds9/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Storkreds10;
   Model Videnspoint=T Storkreds10  T*Storkreds10/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Civil*/
Proc genmod data=longdata descending;
   Class T ID Civilstand;
   Model Videnspoint=T Civilstand  T*Civilstand/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Civil1;
   Model Videnspoint=T Civil1  T*Civil1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Civil2;
   Model Videnspoint=T Civil2  T*Civil2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Civil3;
   Model Videnspoint=T Civil3  T*Civil3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Civil4;
   Model Videnspoint=T Civil4  T*Civil4/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Civil5;
   Model Videnspoint=T Civil5  T*Civil5/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Arb/udd i sundhedsv�senet*/
Proc genmod data=longdata descending;
   Class T ID AUsundhed;
   Model Videnspoint=T AUsundhed  T*AUsundhed/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID AUsundhed1;
   Model Videnspoint=T AUsundhed1  T*AUsundhed1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Brystkr�ft*/
Proc genmod data=longdata descending;
   Class T ID Brystkraeft;
   Model Videnspoint=T Brystkraeft  T*Brystkraeft/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Brystkraeft1;
   Model Videnspoint=T Brystkraeft1  T*Brystkraeft1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Brystkraeft2;
   Model Videnspoint=T Brystkraeft2  T*Brystkraeft2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Bekymring*/
Proc genmod data=longdata descending;
   Class T ID T1HVbekymret;
   Model Videnspoint=T T1HVbekymret  T*T1HVbekymret/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret1;
   Model Videnspoint=T HVbekymret1  T*HVbekymret1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret2;
   Model Videnspoint=T HVbekymret2  T*HVbekymret2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret3;
   Model Videnspoint=T HVbekymret3  T*HVbekymret3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret4;
   Model Videnspoint=T HVbekymret4  T*HVbekymret4/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret5;
   Model Videnspoint=T HVbekymret5  T*HVbekymret5/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret6;
   Model Videnspoint=T HVbekymret6  T*HVbekymret6/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID HVbekymret7;
   Model Videnspoint=T HVbekymret7  T*HVbekymret7/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
/*Vidensniveau*/
Proc genmod data=longdata descending;
   Class T ID T1Vidensniveau;
   Model Videnspoint=T T1Vidensniveau  T*T1Vidensniveau/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Vniveau1;
   Model Videnspoint=T Vniveau1  T*Vniveau1/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Vniveau2;
   Model Videnspoint=T Vniveau2  T*Vniveau2/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 
Proc genmod data=longdata descending;
   Class T ID Vniveau3;
   Model Videnspoint=T Vniveau3  T*Vniveau3/ link=id type3;
   Repeated subject=ID/type=ind corrw;
Run; 







/* ------------------------------S5 Table - Level of knowledge (%correct answers)-----------------------------------------*/

proc freq data=Surveyrecode;
tables T1K1korrekt T1K2korrekt T1K3korrekt T1K4korrekt  T1K5korrekt T1K6korrekt 
T1K7korrekt T1K8korrekt T1K9korrekt T1N1gist T1N2gist T1N3gist T1N4gist ;
run;

proc freq data=Surveyrecode;
tables T2K1korrekt T2K2korrekt T2K3korrekt T2K4korrekt  T2K5korrekt T2K6korrekt 
T2K7korrekt T2K8korrekt T2K9korrekt T2N1gist T2N2gist T2N3gist T2N4gist ;
run;

proc freq data=Surveyrecode;
tables T3K1korrekt T3K2korrekt T3K3korrekt T3K4korrekt  T3K5korrekt T3K6korrekt 
T3K7korrekt T3K8korrekt T3K9korrekt T3N1gist T3N2gist T3N3gist T3N4gist ;
run;

proc freq data=Surveyrecode;
tables T4K1korrekt T4K2korrekt T4K3korrekt T4K4korrekt  T4K5korrekt T4K6korrekt 
T4K7korrekt T4K8korrekt T4K9korrekt T4N1gist T4N2gist T4N3gist T4N4gist ;
run;

/*Test, difference, pp*/
Proc genmod data=longdata descending;
   Class T ID;
   Model K1korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K2korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K3korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K4korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K5korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K6korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K7korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K8korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model K9korrekt=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model N1gist=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model N2gist=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model N3gist=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;
Proc genmod data=longdata descending;
   Class T ID;
   Model N4gist=T/dist=bin link=id type3;
   Repeated subject=ID/type=ind corrw;
Run;



